package ec;

/**
 * 
 * The interface used for classes that perform fitness evaluations of Solutions
 * 
 * @author Nathaniel Troutman
 * 
 */
public interface FitnessEvaluator {
	/**
	 * Calculates the fitness of the given solution
	 * 
	 * @param solution the solution whose fitness to evaluate
	 * 
	 * @return the fitness of the evaluated solution
	 */
	public double getFitness(Solution raw_solution);

	/**
	 * Return the theoretical maximum fitness of the solution.
	 * 
	 * @return
	 */
	public double getMaxFitness();

	
	/**
	 * Returns true if fitnessA is better than fitnessB
	 * 
	 * @param fitnessA
	 * @param fitnessB
	 * 
	 * @return
	 */
	public boolean compare(double fitnessA, double fitnessB);

	/**
	 * Returns the worst possible fitness. Mainly used for comparison.
	 * 
	 * @return
	 */
	public double getWorstFitness();
}
